<!DOCTYPE html>
<html lang="zh-CN">

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>影视表</title>
    <meta name="keywords" content="">
    <meta name="description" content="">

    <link rel="shortcut icon" href="https://cdn.p00q.cn/favicon.ico">
    <link href="https://cdn.p00q.cn/hAdmin/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="https://cdn.p00q.cn/hAdmin/css/font-awesome.css?v=4.4.0" rel="stylesheet">

    <!-- jqgrid-->
    <link href="https://cdn.p00q.cn/hAdmin/css/plugins/jqgrid/ui.jqgrid.css?0820" rel="stylesheet">

    <link href="https://cdn.p00q.cn/hAdmin/css/animate.css" rel="stylesheet">
    <link href="https://cdn.p00q.cn/hAdmin/css/style.css?v=4.1.0" rel="stylesheet">

    <style>
        /* Additional style to fix warning dialog position */

        #alertmod_table_list_2 {
            top: 900px !important;
        }
    </style>

</head>

<body class="gray-bg">
<div class="wrapper wrapper-content  animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox ">
                <div class="ibox-title">
                </div>
                <div class="ibox-content">
                    <div class="jqGrid_wrapper">
                        <table id="table_list_2"></table>
                        <div id="pager_list_2"></div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<!-- 全局js -->
<script src="https://cdn.p00q.cn/hAdmin/js/jquery.min.js?v=2.1.4"></script>
<script src="https://cdn.p00q.cn/hAdmin/js/bootstrap.min.js?v=3.3.6"></script>


<!-- Peity -->
<script src="https://cdn.p00q.cn/hAdmin/js/plugins/peity/jquery.peity.min.js"></script>

<!-- jqGrid -->
<script src="https://cdn.p00q.cn/hAdmin/js/plugins/jqgrid/i18n/grid.locale-cn.js?0820"></script>
<script src="https://cdn.p00q.cn/hAdmin/js/plugins/jqgrid/jquery.jqGrid.min.js?0820"></script>

<!-- 自定义js -->
<script src="https://cdn.p00q.cn/hAdmin/js/content.js?v=1.0.0"></script>

<!-- Page-Level Scripts -->
<script>
    $(document).ready(function () {

        $.jgrid.defaults.styleUI = 'Bootstrap';
        // Examle data for jqGrid
        // Configuration for jqGrid Example 2
        $("#table_list_2").jqGrid({
            url: '/admin/getysb',//请求数据的地址
            editurl: "/admin/ysedit",
            datatype: "json",
            height: 700,
            autowidth: true,
            shrinkToFit: true,
            rowNum: 20,
            rowList: [10, 20, 30, 50],
            colNames: ['序号', '片名', '图片地址', '状态', '评分', '别名', '导演', '主演', '类型', '地区', '语言', '上映时间', '片长', '更新时间', '介绍', '观看地址', '下载地址'],
            colModel: [
                {
                    name: 'id',
                    index: 'id',
                    editable: true,
                    width: 60,
                    sorttype: "int",
                    search: true,
                    sortable: false,
                    searchoptions: {
                        sopt: ['eq']
                    }
                },
                {
                    name: 'pm',
                    index: 'pm',
                    editable: true,
                    width: 120,
                    search: true,
                    sortable: false,
                    searchoptions: {
                        sopt: ['cn']
                    }
                },
                {
                    name: 'tp',
                    index: 'tp',
                    editable: true,
                    width: 80,
                    sortable: false,
                    search: false
                },
                {
                    name: 'zt',
                    index: 'zt',
                    editable: true,
                    width: 100,
                    search: false,
                    sortable: false,
                },
                {
                    name: 'pf',
                    index: 'pf',
                    editable: true,
                    width: 40,
                    align: "right",
                    sorttype: "float"
                    , sortable: false,
                    search: false
                },
                {
                    name: 'bm',
                    index: 'bm',
                    editable: true,
                    width: 120,
                    sortable: false,
                    search: false
                },
                {
                    name: 'dy',
                    index: 'dy',
                    editable: true,
                    width: 60,
                    sortable: false,
                    search: false
                },
                {
                    name: 'zy',
                    index: 'zy',
                    editable: true,
                    width: 80,
                    sortable: false,
                    search: false
                },
                {
                    name: 'lx',
                    index: 'lx',
                    editable: true,
                    width: 60,
                    sortable: false,
                    search: false
                },
                {
                    name: 'dq',
                    index: 'dq',
                    editable: true,
                    width: 50,
                    sortable: false,
                    search: false
                },
                {
                    name: 'yy',
                    index: 'yy',
                    editable: true,
                    width: 50,
                    sortable: false,
                    search: false
                },
                {
                    name: 'sytime',
                    index: 'sytime',
                    editable: true,
                    width: 90,
                    sorttype: "date",
                    formatter: "date",
                    sortable: false,
                    search: false
                },
                {
                    name: 'pctime',
                    index: 'pctime',
                    editable: true,
                    width: 50,
                    sortable: false,
                    search: false
                },
                {
                    name: 'gxtime',
                    index: 'gxtime',
                    editable: true,
                    width: 90,
                    sorttype: "date",
                    formatter: "date",
                    sortable: false,
                    search: false
                },
                {
                    name: 'js',
                    index: 'js',
                    editable: true,
                    width: 150,
                    sortable: false,
                    search: false
                },
                {
                    name: 'gkdz',
                    index: 'gkdz',
                    editable: true,
                    width: 100,
                    sortable: false,
                    search: false
                },
                {
                    name: 'xzdz',
                    index: 'xzdz',
                    editable: true,
                    width: 100,
                    sortable: false,
                    search: false
                }
            ],
            pager: "#pager_list_2",
            viewrecords: true,
            caption: "影视管理表",
            add: true,
            edit: true,
            addtext: 'Add',
            edittext: 'Edit',
            hidegrid: false
        });

        // Add selection
        $("#table_list_2").setSelection(4, true);


        // Setup buttons
        $("#table_list_2").jqGrid('navGrid', '#pager_list_2', {
            edit: true,
            add: true,
            del: true,
            search: true
        }, {
            height: 800,
            reloadAfterSubmit: true
        });

        // Add responsive to jqGrid
        $(window).bind('resize', function () {
            var width = $('.jqGrid_wrapper').width();
            $('#table_list_2').setGridWidth(width);
        });
    });
</script>
</body>

</html>
